package com.yunhe.estatemanage.repository;

import com.yunhe.estatemanage.domain.ReportRepair;
import com.yunhe.estatemanage.model.ReportRepairCondition;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @ClassName: ReportRepairRepository
 * @Description:
 * @author: GongDaCheng
 * @Date: 16:22 2021/9/3
 */
@Repository
public interface ReportRepairRepository {

    /**
     * @Description 新增报事报修
     * @Param ReportRepair reportRepair
     * @Return int
     * @Date 2021/9/3 17:10
     */
    int create(ReportRepair reportRepair);

    /**
     * @Description 根据id删除报事报修
     * @Param Long id
     * @Return int
     * @Date 2021/9/3 17:11
     */
    int deleteByPrimaryKey(@Param("id") Long id);

    /**
     * @Description 更新报事报修
     * @Param ReportRepair reportRepair
     * @Return int
     * @Date 2021/9/3 17:11
     */
    int updateByPrimaryKey(ReportRepair reportRepair);

    /**
     * @Description 根据id查询报事报修
     * @Param Long id
     * @Return ReportRepair
     * @Date 2021/9/3 17:11
     */
    ReportRepair searchByPrimaryKey(@Param("id") Long id);

    /**
     * @Description 根据条件筛选报事报修Web
     * @Param List<Long> ids, ReportRepairCondition reportRepairCondition
     * @Return List<ReportRepair>
     * @Date 2021/9/6 10:52
     */
    List<ReportRepair> findReportRepairByConditionWeb(ReportRepairCondition reportRepairCondition);

    /**
     * @Description 根据条件筛选报事报修Mob
     * @Param ReportRepairCondition reportRepairCondition
     * @Return List<ReportRepair>
     * @Date 2021/9/7 10:29
     */
    List<ReportRepair> findReportRepairByConditionMob(ReportRepairCondition reportRepairCondition);

    /**
     * @Description 退回时更新字段（组织id和当前处理人id为空时也更新为空）
     * @Param ReportRepair reportRepair
     * @Return
     * @Date 2021/9/20 14:17
     */
    void backUpdateReportRepair(ReportRepair reportRepair);
}
